package shiyi.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController//  该注解为组合注解，等同于Spring中@Controller+@ResponseBody注解
@Slf4j
public class HelloController {

    //http://localhost:8081/hello
    @GetMapping("/hello")
    public String hello(){
        log.info("项目启动成功");
        return "Hello SpringBoot!";
    }
}
